{foreach $mediaSearch as $media}
<tr>
    <td>{$media->getPost()->getDateCreated()->format('Y-m-d')}</td>
    <td><a href="/user/view/{$media->getPost()->getAuthor()->getUsername()}"
           alt="{$media->getPost()->getAuthor()}">{$media->getPost()->getAuthor()}</a></td>
    <td><a href="/post/read/{$media->getPost()->getId()}"
           alt="{$media->getPost()->getTitle()}">{$media->getPost()->getTitle()}</a></td>
    <td>
        <div id="modalImage{$media@index}" class="modal fade out">
            <div class="modal-header">
                <a href="#" class="close"><i class="icon-remove"></i></a>
                <h3>{$media->getPost()->getTitle()}</h3>
            </div>
            <div class="modal-body">
                <img src="/uploads/{$media->getLocation()}" alt="{$media->getDescription()}">
            </div>
            <div class="modal-footer">
                <p>{$media->getDescription()}</p>
            </div>
        </div>
        <a href="#" data-controls-modal="modalImage{$media@index}" data-toggle="modalImage{$media@index}" data-backdrop="true" data-keyboard="true">
            <img src="/uploads/thumbs/thumb_{$media->getLocation()}" alt="{$media->getDescription()}">
        </a>
    </td>
    <td>{$media->getDescription()}</td>
</tr>
{/foreach}